Skip to content

Conversation

@danielopitz
Copy link
Contributor

The change is very minor, it just extends the type definition for a feature implemented in #284 and thus fixes #332

I'm not a TS expert, so I'm happy for any input on this.

One minor point though: I'm not sure about tests. They are kind of broken for TS part right now and I fixed some small things (like mismatch in the engines / templates / extensions), but it is not possible, at least with ejs, to have one server serving both an application with a global template and an application with a route specific template, because these are mutually exclusive.

Another minor thing: in the template for index-with-no-data, there are some values specified, which are not optional for ejs. I can fix this, but I would like to discuss first how the fix should look like (e.g. running two fastify servers on different ports, one with global layout, one with local layout, updating templates accordingly or adding new ones etc.).

Checklist

Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Terence-art
Copy link

var server;
function call1() {
server = "Sever1";
}
function call2() {
server = "Sever2";
}
server = "Server3"

Could be usefull?

@mcollina mcollina merged commit 6d6de5b into fastify:master Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TS definitions missing third parameter for the view function

5 participants